﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows.Controls;

namespace LinkShareWpf.Converters
{
    public class RadioButtonToStringConverter : IMultiValueConverter
    {

        public object Convert(object[] values,  Type targetType, object parameter,  System.Globalization.CultureInfo culture)
        {
            for (int i = 0; i < values.Length; i++)
                if ((Boolean)values[i] == true)
                    return ((Array)parameter).GetValue(i);
            return "Ops!";
        }

        public object[] ConvertBack(object value,  Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}



